<template>
    <div class="comment_cell">

        <!-- 头像 开始 -->
        <div class="avatar">
            <li-image :src="info.reviewerAvatar" class="img" alt="" />
        </div>
        <!-- 头像 end -->

        <!-- 评论信息 开始 -->
        <div class="info_box">
            <div class="title">
                <span class="phone">{{ info.reviewer }}</span>
                <span class="time">{{ info.createdDate }}</span>
            </div>
            <div class="score">
                <div class="rate">
                    <img src="@/assets/images/rate.png" class="img" alt="">
                    <span>{{ $fomartRate(info.scoreOverall) }}分</span>
                </div>
            </div>
            <div class="comment">
                {{ info.content }}
            </div>
            <div class="comment_img" v-if="info.commentPics && info.commentPics.length">
                <li-image v-for="(item,index) in (info.commentPics||[])" class="img" :src="item" :key="`img_${index}`" :is-preview="true" />
            </div>
        </div>
        <!-- 评论信息 end -->

    </div>
</template>
<script>
export default {
    name: 'Comment',
    props: {
        info: {
            type: Object,
            default: function () {
                return {}
            }
        },
    },
    data() {
        return {

        }
    },
    methods: {

    }
}
</script>
<style lang="less" scoped>
@import './index.less';
</style>